<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->     <?php
        function creer_formulaire($form_action, $form_method, $form_name="form1"){
          $form_id = $form_name;  
       ?> 
  <form name="<?php echo $form_name; ?>" action="<?php echo $form_action; ?>" id="<?php echo $form_id; ?>" method="<?php echo $form_method; ?>">

<?php 
}

?>
  
      <?php 
 function creer_texte($name, $id){
?>
      <div><textarea name="<?php echo $form_name; ?>" id="<?php echo $id; ?>" </textarea></div>
<?php 
}

?>

           <?php 
 function input($type, $name, $id, $value, $maxlenght, $checked, $required, $placeholder, $version_html){
     if ($checked=true){
         if($version_html = 5){
         $checked = 'checked';
     }
     else {
         $checked = 'checked = "checked"';
     }
     }
 else {
         $checked="";
     }
?>
      <div><input type="<?php echo $type; ?>" name="<?php echo $name; ?>" id="<?php echo $id; ?>" value="<?php echo $checked; ?>" maxlenght="<?php echo $maxlenght; ?>" checked="<?php echo $checked; ?>" required="<?php echo $required; ?>" placeholder="<?php echo $placeholder; ?>"  ></div>
<?php 
}

?>
      
<?php 
  
 function fermer_formulaire(){
     echo "</form>";
 }
?>
 

  
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php
         input("chackbox", "case1", "case1", "ok", "", true, "", "", 5)
        ?>
    </body>
</html>
